Skip to content

feat: add C implementation for stats/base/dists/pareto-type1/median#10079

Open
Witty-31-06 wants to merge 4 commits intostdlib-js:developfrom
Witty-31-06:pareto-type1-median
Open

feat: add C implementation for stats/base/dists/pareto-type1/median#10079
Witty-31-06 wants to merge 4 commits intostdlib-js:developfrom
Witty-31-06:pareto-type1-median

Conversation

@Witty-31-06
Copy link
Copy Markdown
Contributor

@Witty-31-06 Witty-31-06 commented Feb 4, 2026


type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes. report:

  • task: lint_filenames status: passed
  • task: lint_editorconfig status: passed
  • task: lint_markdown status: passed
  • task: lint_package_json status: passed
  • task: lint_repl_help status: na
  • task: lint_javascript_src status: passed
  • task: lint_javascript_cli status: na
  • task: lint_javascript_examples status: na
  • task: lint_javascript_tests status: passed
  • task: lint_javascript_benchmarks status: passed
  • task: lint_python status: na
  • task: lint_r status: na
  • task: lint_c_src status: missing_dependencies
  • task: lint_c_examples status: missing_dependencies
  • task: lint_c_benchmarks status: missing_dependencies
  • task: lint_c_tests_fixtures status: na
  • task: lint_shell status: na
  • task: lint_typescript_declarations status: passed
  • task: lint_typescript_tests status: na
  • task: lint_license_headers status: passed ---

Resolves #3861

Description

What is the purpose of this pull request?

This pull request:

  • Adds a C API to calculate Pareto Type I Median.
  • Includes benchmark and implementation for C examples

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

{{TODO: add disclosure if applicable}}


@stdlib-js/reviewers

@stdlib-bot
Copy link
Copy Markdown
Contributor

👋 Hi there! 👋

And thank you for opening your first pull request! We will review it shortly. 🏃 💨

Getting Started

Next Steps

  1. A project maintainer will approve GitHub Actions workflows for your PR.
  2. All CI checks must pass before your submission can be fully reviewed.
  3. You'll need to address any failures in linting or unit tests.

Running Tests Locally

You can use make to run any of the CI commands locally from the root directory of the stdlib repository:

# Run tests for all packages in the math namespace:
make test TESTS_FILTER=".*/@stdlib/math/.*"

# Run benchmarks for a specific package:
make benchmark BENCHMARKS_FILTER=".*/@stdlib/math/base/special/sin/.*"

If you haven't heard back from us within two weeks, please ping us by tagging the "reviewers" team in a comment on this PR.

If you have any further questions while waiting for a response, please join our Zulip community to chat with project maintainers and other community members.

We appreciate your contribution!

Documentation Links

@stdlib-bot stdlib-bot added Good First PR A pull request resolving a Good First Issue. Statistics Issue or pull request related to statistical functionality. First-time Contributor A pull request from a contributor who has never previously committed to the project repository. Needs Review A pull request which needs code review. and removed Good First PR A pull request resolving a Good First Issue. labels Feb 4, 2026
@Witty-31-06 Witty-31-06 changed the title feat: add C implementation for `@stdlib/stats/base/dists/pareto-type1… feat: add C implementation for @stdlib/stats/base/dists/pareto-type1 Feb 10, 2026
@Witty-31-06 Witty-31-06 changed the title feat: add C implementation for @stdlib/stats/base/dists/pareto-type1 feat: add C implementation for stats/base/dists/pareto-type1/median Feb 11, 2026
@Witty-31-06
Copy link
Copy Markdown
Contributor Author

Hi @Planeshifter @kgryte can you please take a look into this?

@Witty-31-06
Copy link
Copy Markdown
Contributor Author

/stdlib update-copyright-years

@stdlib-bot stdlib-bot added bot: In Progress Pull request is currently awaiting automation. and removed bot: In Progress Pull request is currently awaiting automation. First-time Contributor A pull request from a contributor who has never previously committed to the project repository. labels Feb 17, 2026
@Witty-31-06
Copy link
Copy Markdown
Contributor Author

@gunjjoshi @anandkaranubc can you take a look at this?

Comment thread lib/node_modules/@stdlib/stats/base/dists/pareto-type1/median/src/main.c Outdated
Comment thread lib/node_modules/@stdlib/stats/base/dists/pareto-type1/median/src/main.c Outdated
Comment thread lib/node_modules/@stdlib/stats/base/dists/pareto-type1/median/src/main.c Outdated
Comment thread lib/node_modules/@stdlib/stats/base/dists/pareto-type1/median/src/main.c Outdated
Comment thread lib/node_modules/@stdlib/stats/base/dists/pareto-type1/median/lib/native.js Outdated
@Planeshifter Planeshifter added Needs Changes Pull request which needs changes before being merged. and removed Needs Review A pull request which needs code review. labels Mar 7, 2026
@stdlib-bot
Copy link
Copy Markdown
Contributor

stdlib-bot commented Mar 7, 2026

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/pareto-type1/median $\color{green}190/190$
$\color{green}+100.00%$
$\color{green}8/8$
$\color{green}+100.00%$
$\color{green}2/2$
$\color{green}+100.00%$
$\color{green}190/190$
$\color{green}+100.00%$

The above coverage report was generated for the changes in this PR.

…/median`

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: passed
  - task: lint_package_json
    status: passed
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: passed
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: passed
  - task: lint_javascript_benchmarks
    status: passed
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: missing_dependencies
  - task: lint_c_examples
    status: missing_dependencies
  - task: lint_c_benchmarks
    status: missing_dependencies
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
If applied, this commit will
fix documentation comment in main.c
spacing issues in median.h
fix parameter description in native.js comment

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: passed
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: missing_dependencies
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
@Witty-31-06 Witty-31-06 force-pushed the pareto-type1-median branch from 59be6b5 to 7024fdc Compare March 7, 2026 17:03
@Witty-31-06
Copy link
Copy Markdown
Contributor Author

/stdlib update-copyright-years

@stdlib-bot stdlib-bot added the bot: In Progress Pull request is currently awaiting automation. label Mar 7, 2026
@stdlib-bot stdlib-bot removed the bot: In Progress Pull request is currently awaiting automation. label Mar 7, 2026
@Witty-31-06 Witty-31-06 requested a review from Planeshifter March 7, 2026 17:34
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Mar 7, 2026
Signed-off-by: Siddhartha Mondal <92244610+Witty-31-06@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Good First PR A pull request resolving a Good First Issue. Needs Changes Pull request which needs changes before being merged. Needs Review A pull request which needs code review. Statistics Issue or pull request related to statistical functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC]: Add C implementation for @stdlib/stats/base/dists/pareto-type1/median

3 participants